Only use a nonparametric test if you are absolutely sure your data do not qualify for a
parametric test (meaning t test, ANOVA, and others that require a particular distribution).
Parametric tests are more powerful. In the NHANES example, the data would qualify for a
parametric test; we only showed you the code for nonparametric tests as an example.
Estimating the Sample Size You Need for
Comparing Averages
There are several ways to estimate the sample size you need in order to be able to detect if there is a
significant result on a t test or an ANOVA. (Check out Chapter 3 for a refresher on the concepts of
power and sample size.)
Using formulas for manual calculation
Chapter 25 provides a set of formulas that let you estimate how many participants you need for several
kinds of t tests and ANOVAs. As with all sample-size calculations, you need to be prepared to specify
two parameters: the effect size of importance, which is the smallest between-group difference that’s
worth knowing about, and the amount of random variability in your data, expressed as the within-
group SD. If you plug these values into the formulas in Chapter 25, you can calculate desired sample
size.
Software and web pages
All the modern statistical programs covered in Chapter 4 provide power and sample-size calculations
for most standard statistical tests. As described in Chapter 4, G*Power is menu-driven, and can be
used for sample size calculations for many tests, including t tests and ANOVAs. If you are using
G*Power, to estimate sample size for t tests, choose t tests from the test family drop-down menu, and
for ANOVA, choose F tests. Then, from the statistical test drop-down menu, choose the test you plan
to use and set type of power analysis to “A priori: Compute required sample size – given α, power,
and effect size.” Then enter the parameters and click determine to calculate the sample size.
In terms of web pages, the website https://statpages.info lists several dozen web pages
that perform power and sample-size calculations for t tests and ANOVAs.